﻿<%@ Page Title="ScrumPeak.com" Language="C#" MasterPageFile="~/Views/Shared/Site.Master"
  AutoEventWireup="true" Inherits="MvcContrib.FluentHtml.ModelViewPage<BacklogModel>" %>

<%@ Import Namespace="Peak.Web.Controllers.HtmlExtentions" %>
<%@ Import Namespace="Peak.Resources" %>
<%@ Import Namespace="Peak.Web.Controllers" %>
<%@ Import Namespace="Peak.Web.Controllers.Models" %>
<asp:Content ContentPlaceHolderID="center" runat="server">  
  <div class="page-title">
    <%= PageTitles.ProjectBacklog %></div>
  <div class="page-content">    
    <%= Html.PopupLink(Labels.Filter, "filterPopup")%>
    <%= Model.Filter.GetDescription() %>
   
    <form method="post" id="search" >    
      <table width="100%">
        <tr>
          <td width="auto">
            <%= Html.TextBox("filter.QuickFilter",null, new { @style = "width:99%;" }) %>
          </td>
          <td width="10">
            <input style="align:left" type="submit" value="<%= Buttons.Search %>" />                        
          </td>
        </tr>
      </table>                                      
    </form>   
          
      <br />
      <%= Html.PeakButton<StoryController>(f=>f.New(),Buttons.AddNew) %>
      <%= Html.PeakButton<ImportController>(f=>f.Index(),Buttons.Import) %>
      <%= Html.PeakRemoveButton<ProjectBacklogController>(f => f.Remove(null), "tableForm")%>
      <%= Html.PeakSubmitButton<ProjectBacklogController>(f => f.Export(null),Buttons.Export,  "tableForm")%>
      <%= Html.PeakSubmitButton<PrintController>(f => f.Stories(null), Buttons.Print, "tableForm")%>          
      <%= Html.PeakSubmitButton<ProjectBacklogController>(f => f.AddToCurrentSprint(null), Buttons.AddToCurrentSprint, "tableForm")%>          
      <div id="filterPopup" class="PopupDiv">
        <form id="filterForm" method="post"  class="PopupContent">
        <table>
          <tr>
            <td width="10">
              <%= this.CheckBox(f=>f.Filter.StatusToDo) %>
            </td>
            <td>
              <%= Statuses.ToDo %>
            </td>
          </tr>
          <tr>
            <td width="10">
              <%= this.CheckBox(f=>f.Filter.StatusInProgress) %>
            </td>
            <td>
              <%= Statuses.InProgress %>
            </td>
          </tr>
          <tr>
            <td width="10">
              <%= this.CheckBox(f=>f.Filter.StatusVerify) %>
            </td>
            <td>
              <%= Statuses.Verify %>
            </td>
          </tr>
          <tr>
            <td width="10">
              <%= this.CheckBox(f=>f.Filter.StatusDone) %>
            </td>
            <td>
              <%= Statuses.Done %>
            </td>
          </tr>          
        </table>
        <%= Html.PeakSubmitButton<ProjectBacklogController>(f => f.Index(null), Buttons.Ok, "filterForm") %>
        </form>
      </div>
    </div>     
    <div id="table" style="clear: both;">
      <% Html.RenderPartial("Table"); %>
    </div>  
</asp:Content>
